<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>AUI快速完成布局</title>
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />

</head>

<body style="background:#fff;">
    <ul class="aui-list" style="border:none;padding-top:0">


        <li style="padding:0 1rem;margin:1.5rem 0;border:none;">
            <input id='password' type="password" placeholder="请输入密码" style="border:1px solid #ccc;text-align:center;border-radius:0.5rem;">
        </li>
        <li style="padding:0 1rem;margin:1rem 0;border:none;">
            <input id='password2' type="password" placeholder="请确认密码" style="border:1px solid #ccc;text-align:center;border-radius:0.5rem;">

        </li>

        <li class="" style="padding:0 1rem;margin:1.5rem 0;border:none;">
            <div tapmode onclick="register();" ; style="border-radius:0.5rem;border:1px solid #ccc;text-align:center;line-height:2rem;background:#ff4285;color:#fff;width:100%">重新输入密码</div>
        </li>
    </ul>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="./conf/config.js"></script>
<script type="text/javascript" src="./js/common.js"></script>
<script type="text/javascript" src="../script/jquery-1.8.2.min.js"></script>
<script type="text/javascript">
    apiready = function() {
//alert(api.pageParam.ret.data.random);
// alert(api.pageParam.username);
// alert(api.pageParam.userid);
// alert(api.pageParam.random);


    };
    //获取验证码
    function register(){
      var psw=$("#password").val();
      var psw1=$("#password1").val();
      if(!psw){
        alert("请填写密码！");
        return false;
      }
      if(psw===psw1){
        alert("两次输入的密码不一样！请重新输入");
        return false;
      }

        api.ajax({
            url: SITE_URL + 'index.php?m=api&c=appnew&a=reset_pwd',
            method: 'post',
            data: {
                values: {
                    "username": api.pageParam.username,
                    "userid": api.pageParam.userid,
                    "password": psw,
                    "random": api.pageParam.random,
                }
            }
        }, function(ret, err) {
          if(ret.status==1){
            alert(ret.msg);
            api.openWin({
                name: 'login',
                url: './login.html',
                pageParam: {
                    name: 'test'
                }
            });

          }else{
            alert(ret.msg);
          }

        });
      }


    //注册

</script>
<!-- <script type="text/javascript">
    function fnGetCheckSms() {
        var phone = $api.byId('account').value;
        if (phone != '') {
            $("#get_sns").css({
                background: "#cccccc",
                color: "#fff"
            }).html('正在发送...');
            api.ajax({
                url: SITE_URL+'index.php?m=api&c=appp&a=send_phcode',
                method: 'GET',
                data: {
                    values: {
                        "phone": phone
                    }
                }
            }, function(ret, err) {
                if (ret.status == 1) {
                    $("#get_sns").css({
                        background: "#cccccc",
                        color: "#fff"
                    }).html('发送成功...');
                }
            });
        } else {
            alert('请填写手机号');
        }
</script> -->

</html>
